package com.kongmou.springJms.jsm;

import org.springframework.jms.core.JmsTemplate;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import javax.jms.Destination;

@Service("productor2")
public class Productor2 {
    @Resource
    private JmsTemplate jmsTemplate;

    public void sendMessage(Destination destination, String message){
        jmsTemplate.convertAndSend(destination, message);
    }
}
